package net.huashitong.ssydt.article.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 新增，修改文章
 *
 * @author hemj
 * @version 2017/9/14
 */
@ApiModel(value = "ArticleArticleInVO", description = "文章新增、修改(后台)")
public class ArticleArticleInVO implements Serializable {

	private static final long serialVersionUID = 8287838044606560038L;

	private Long id;//文章ID

	@ApiModelProperty(value = "标题")
	@NotEmpty(message = "标题不能为空")
	private String title;//标题

	@ApiModelProperty(value = "文章分类ID")
	@NotNull(message = "文章分类ID不能为空")
	private Long articleTypeId;//文章分类ID

	@ApiModelProperty(value = "图片URL")
//	@NotEmpty(message = "图片URL不能为空")
	@URL(message = "图片URL格式错误")
	private String imageUrl;//图片URL

	@ApiModelProperty(value = "声音URL")
	@URL(message = "声音URL格式错误")
	private String soundUrl;//声音URL

	@ApiModelProperty(value = "所属日期")
	@NotEmpty(message = "所属日期不能为空")
	private String belongDate;//所属日期

	@ApiModelProperty(value = "置顶")
	@NotNull(message = "置顶不能为空")
	@Min(value = 0, message = "置顶不能为负值")
	private Integer topArticle;//置顶

	@ApiModelProperty(value = "创建用户")
	@NotEmpty(message = "创建用户不能为空")
	private String createUserId;//创建用户

	@ApiModelProperty(value = "摘要")
	@NotEmpty(message = "摘要不能为空")
	private String outline;//摘要

	@ApiModelProperty(value = "文章内容")
	@NotEmpty(message = "文章内容不能为空")
	private String content;//文章内容

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Long getArticleTypeId() {
		return articleTypeId;
	}

	public void setArticleTypeId(Long articleTypeId) {
		this.articleTypeId = articleTypeId;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public String getSoundUrl() {
		return soundUrl;
	}

	public void setSoundUrl(String soundUrl) {
		this.soundUrl = soundUrl;
	}

	public String getBelongDate() {
		return belongDate;
	}

	public void setBelongDate(String belongDate) {
		this.belongDate = belongDate;
	}

	public Integer getTopArticle() {
		return topArticle;
	}

	public void setTopArticle(Integer topArticle) {
		this.topArticle = topArticle;
	}

	public String getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(String createUserId) {
		this.createUserId = createUserId;
	}

	public String getOutline() {
		return outline;
	}

	public void setOutline(String outline) {
		this.outline = outline;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
}
